﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DVSProject.Models.LocationSetModels>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Create Location
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <script type ="text/javascript">
     $(function () {
         $("#LocationSetCode").attr('maxlength', '4');
//         $('#PresentCount').bind('keypress', function (e) {
//             return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
//         })
     });
    </script>
    <h2>Create Location</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
         <%--   <div class="editor-label">
                <%= Html.LabelFor(model => model.LocSetId) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.LocSetId) %>
                <%= Html.ValidationMessageFor(model => model.LocSetId) %>
            </div>--%>
            
            <div class="editor-label">
               Location Code
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.LocationSetCode, new { @class = "textbox" })%>
                <%= Html.ValidationMessageFor(model => model.LocationSetCode) %>
                  <p class="errormessage" align="left">
                <%=TempData["errorname0"]%>
            </p>
            </div>

            <div class="editor-label">
             Location Name Th :
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.LocSetNameTh) %>
                <%= Html.ValidationMessageFor(model => model.LocSetNameTh) %>
                <p class="errormessage" align="left">
                <%=TempData["errorname1"]%>
            </p>
            </div>
            
            <div class="editor-label">
                 Location Name En :
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.LocSetNameEng) %>
                <%= Html.ValidationMessageFor(model => model.LocSetNameEng) %>
                  <p class="errormessage" align="left">
                <%=TempData["errorname2"]%>
            </p>
            </div>
              <div class="editor-label">
               Merchant :
            </div>
            <div class="editor-field">
                <%=Html.DropDownListFor(model => model.MerchantId, Model.MerchantSelect)%>
            </div>
          <%--  <div class="editor-label">
                <%= Html.LabelFor(model => model.Status) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Status) %>
                <%= Html.ValidationMessageFor(model => model.Status) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.CreateBy) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.CreateBy) %>
                <%= Html.ValidationMessageFor(model => model.CreateBy) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.CreateOn) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.CreateOn) %>
                <%= Html.ValidationMessageFor(model => model.CreateOn) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.UpdateBy) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.UpdateBy) %>
                <%= Html.ValidationMessageFor(model => model.UpdateBy) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.UpdateOn) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.UpdateOn) %>
                <%= Html.ValidationMessageFor(model => model.UpdateOn) %>
            </div>
            --%>
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

